<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var date=new Date();
        yy=date.getFullYear();
        MM=date.getMonth()+1;
        dd=date.getDate();
        hh=date.getHours();
        mm=date.getMinutes();
        ss=date.getSeconds();
        ms=date.getUTCMilliseconds();

        MM=MM.toString().padStart(2,"0");
        dd=dd.toString().padStart(2,"0");
        hh=hh.toString().padStart(2,"0");
        mm=mm.toString().padStart(2,"0");
        ss=ss.toString().padStart(2,"0");
        ms=ms.toString().padStart(3,"0");

        var data=`${yy}年${MM}月${dd}日 ${hh}时${mm}分${ss}秒${ms}毫秒`;
        console.log(data);
    </script>
</body>
</html>